home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD ROM Paradise Collection 4
/
CD ROM Paradise Collection 4 1995 Nov.iso
/
program
/
swagg_m.zip
/
KEYBOARD.SWG
/
0051_Clear Keyboard QUICK.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1993-10-28
|
570b
|
24 lines
(*==========================================================================
Date: 08-25-93 (00:32)
From: MARC BIR
Subj: CLEAR KEYBOARD
Here's a quick way to clear keyboard buffer:
*)
Procedure ClearKeyBoard;
Begin
ASM CLI End;
MemW[$40:$1A] := MemW[$40:$1C];
ASM STI End;
End;
(*
MemW[$40:$1A] = ptr to next char in cyclical kbd buffer
MemW[$40:$1C] = ptr to last char ""
Incase you haven't had data structures, when the next ptr equals the
last ptr in a cyclical buufer, the buffer is empty.
Hope that helps ( doesn't need CRT )